﻿@inject ShellNavigationManager NavigationManager
<ContentPage>
    <ScrollView>
        <StackLayout>
            @foreach (var animal in CatData.Cats)
            {
                <AnimalTemplate Animal="animal" OnClick="AnimalClicked" />
            }
        </StackLayout>
    </ScrollView>
</ContentPage>



@code {
    async Task AnimalClicked(Animal animal)
    {
        await NavigationManager.NavigateToAsync($"/catdetails/{animal.Name}");
    }
}